.class Lcom/baidu/al;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field final synthetic a:Lcom/baidu/aj;


# direct methods
.method constructor <init>(Lcom/baidu/aj;)V
    .locals 0

    iput-object p1, p0, Lcom/baidu/al;->a:Lcom/baidu/aj;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 3

    :try_start_0
    invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;

    move-result-object v0

    const-string v1, "mounted"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/baidu/al;->a:Lcom/baidu/aj;

    iget-object v0, v0, Lcom/baidu/aj;->b:Lcom/baidu/AppActivity;

    invoke-static {v0}, Lcom/baidu/AppActivity;->d(Lcom/baidu/AppActivity;)Landroid/os/Handler;

    move-result-object v0

    new-instance v1, Lcom/baidu/am;

    invoke-direct {v1, p0}, Lcom/baidu/am;-><init>(Lcom/baidu/al;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :goto_0
    return-void

    :cond_0
    const-string v0, "action.onClick [to download]"

    invoke-static {v0}, Lcom/baidu/bk;->b(Ljava/lang/String;)I

    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.VIEW"

    iget-object v2, p0, Lcom/baidu/al;->a:Lcom/baidu/aj;

    iget-object v2, v2, Lcom/baidu/aj;->b:Lcom/baidu/AppActivity;

    invoke-static {v2}, Lcom/baidu/AppActivity;->b(Lcom/baidu/AppActivity;)Lcom/baidu/App;

    move-result-object v2

    invoke-virtual {v2}, Lcom/baidu/App;->c()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    const-string v1, "com.android.browser"

    const-string v2, "com.android.browser.BrowserActivity"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v1, p0, Lcom/baidu/al;->a:Lcom/baidu/aj;

    iget-object v1, v1, Lcom/baidu/aj;->b:Lcom/baidu/AppActivity;

    invoke-virtual {v1, v0}, Lcom/baidu/AppActivity;->startActivity(Landroid/content/Intent;)V

    invoke-static {}, Lcom/baidu/as;->a()Lcom/baidu/as;

    move-result-object v0

    iget-object v1, p0, Lcom/baidu/al;->a:Lcom/baidu/aj;

    iget-object v1, v1, Lcom/baidu/aj;->b:Lcom/baidu/AppActivity;

    invoke-static {v1}, Lcom/baidu/AppActivity;->b(Lcom/baidu/AppActivity;)Lcom/baidu/App;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/baidu/as;->a(Lcom/baidu/bl;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    invoke-static {v0}, Lcom/baidu/bk;->a(Ljava/lang/Throwable;)I

    goto :goto_0
.end method
